<?php
	if(!empty($_GET)){
		if(!empty($_GET['admin'])=='home'){

if(!empty($_SESSION['admin'])  && A!='login' && A!='loginout'){

	if(empty($_SESSION['level_arr'])){
		$xml = simplexml_load_file(MODEL_PATH.'list.xml');
		foreach ($xml->module as $value) {
			if(in_array($value->name->attributes()->id,$_SESSION['admin']['menu'])){
				foreach ($value->method as $val) {
					if(in_array($val->methodname->attributes()->id,$_SESSION['admin']['menu'])){
						$con=(string)$value->en;
						$method=(string)$val->en;
						$arr[$con.'/'.$method]=(int)$val->methodname->attributes()->id;
					}
				}
			}
		}
		$_SESSION['level_arr']=$arr;
	}

	if(empty($_SESSION['level_arr'][C.'/'.A])){
		 // print_r($_SESSION['level_arr']);
		die('没有权限');
	}
}

		}
	}
?>